import request from '@/utils/request'
import {formatePostParam} from '@/utils'
const BASE_URL = ''

// 获取企业列表数据
export function getEntList(query) {
	return request({
		url: `${BASE_URL}/EnterpriseLst.asmx/getEntList`,
		method: 'post',
		params: query
	})
}
// 获取企业列表数据
export function getEntInfo(query) {
	return request({
		url: `${BASE_URL}/EnterpriseLst.asmx/getEntInfo`,
		method: 'post',
		params: query
	})
}

// 新增企业数据
export function insertEntInfo(query) {
	query = formatePostParam(query)
	return request({
		url: `${BASE_URL}/EnterpriseLst.asmx/insertEntInfo`,
		method: 'post',
		data: query
	})
}


// 编辑企业列表数据
export function updateEntInfo(query) {
	query = formatePostParam(query)
	return request({
		url: `${BASE_URL}/EnterpriseLst.asmx/updateEntInfo`,
		method: 'post',
		data: query
	})
}

// 获取场所信息列表--------------------------------------
export function getAreaList(query) {
	return request({
		url: `${BASE_URL}/EnterpriseSiteLst.asmx/getAreaList`,
		method: 'post',
		params: query
	})
}
// 新增场所信息列表
export function insertAreaInfo(query) {
	query = formatePostParam(query)
	return request({
		url: `${BASE_URL}/EnterpriseSiteLst.asmx/insertAreaInfo`,
		method: 'post',
		data: query
	})
}
// 修改场所信息列表
export function updateAreaInfo(query) {
	query = formatePostParam(query)
	return request({
		url: `${BASE_URL}/EnterpriseSiteLst.asmx/updateAreaInfo`,
		method: 'post',
		data: query
	})
}
// 获取场所详情
export function getAreaInfo(query) {
	return request({
		url: `${BASE_URL}/EnterpriseSiteLst.asmx/getAreaInfo`,
		method: 'post',
		params: query
	})
}
// 新增汽车数据
export function insertCar(query) {
	query = formatePostParam(query)
	return request({
		url: `${BASE_URL}/EnterpriseSiteLst.asmx/insertCar`,
		method: 'post',
		data: query
	})
}

// 修改汽车数据
export function updateCar(query) {
	query = formatePostParam(query)
	return request({
		url: `${BASE_URL}/EnterpriseSiteLst.asmx/updateCar`,
		method: 'post',
		data: query
	})
}

// 获取许可证信息列表----------------------------------------------
// 新增/编辑
export function insertEnterpriseRadPermit(query) {
	query = formatePostParam(query)
	return request({
		url: `${BASE_URL}/EnterpriseRadPermitLst.asmx/insertEnterpriseRadPermit`,
		method: 'post',
		data: query
	})
}
// 获取
export function getEnterpriseRadPermit(query) {
	return request({
		url: `${BASE_URL}/EnterpriseRadPermitLst.asmx/getEnterpriseRadPermit`,
		method: 'post',
		params: query
	})
}
// 获取巡检仪信息列表----------------------------------------------
export function getPatrolList(query) {
	return request({
		url: `${BASE_URL}/EnterprisePadLst.asmx/getPatrolList`,
		method: 'post',
		params: query
	})
}
// 新增巡检仪
export function insertPatro(query) {
	query = formatePostParam(query)
	return request({
		url: `${BASE_URL}/EnterprisePadLst.asmx/insertPatro`,
		method: 'post',
		data: query
	})
}
// 修改巡检仪
export function updatePatro(query) {
	query = formatePostParam(query)
	return request({
		url: `${BASE_URL}/EnterprisePadLst.asmx/updatePatro`,
		method: 'post',
		data: query
	})
}
// 获取巡检仪详情
export function getPatroInfo(query) {
	return request({
		url: `${BASE_URL}/EnterprisePadLst.asmx/getPatroInfo`,
		method: 'post',
		params: query
	})
}

// 获取数采仪信息列表--------------------------------------------------
export function getInstrumentList(query) {
	return request({
		url: `${BASE_URL}/EnterpriseDataGatheringDeviceLst.asmx/getInstrumentList`,
		method: 'post',
		params: query
	})
}
// 新增数采仪
export function insertInstrument(query) {
	query = formatePostParam(query)
	return request({
		url: `${BASE_URL}/EnterpriseDataGatheringDeviceLst.asmx/insertInstrument`,
		method: 'post',
		data: query
	})
}
// 修改数采仪
export function updateInstrument(query) {
	query = formatePostParam(query)
	return request({
		url: `${BASE_URL}/EnterpriseDataGatheringDeviceLst.asmx/updateInstrument`,
		method: 'post',
		data: query
	})
}
// 获取数采仪详情
export function getInstrumentInfo(query) {
	return request({
		url: `${BASE_URL}/EnterpriseDataGatheringDeviceLst.asmx/getInstrumentInfo`,
		method: 'post',
		params: query
	})
}
// 获取用源设备列表---------------------------------------------------
export function getUseSourceDeviceList(query) {
	return request({
		url: `${BASE_URL}/EnterpriseSiteUseRadDeviceLst.asmx/getUseSourceDeviceList`,
		method: 'post',
		params: query
	})
}
export function getUseSourceDeviceData(query) {
	return request({
		url: `${BASE_URL}/EnterpriseSiteUseRadDeviceLst.asmx/getUseSourceDeviceList`,
		method: 'post',
		params: query
	}).then(res => res.data.useSourceDeviceList)
}
// 新增用源设备
export function insertUseSourceDevice(query) {
	query = formatePostParam(query)
	return request({
		url: `${BASE_URL}/EnterpriseSiteUseRadDeviceLst.asmx/insertUseSourceDevice`,
		method: 'post',
		data: query
	})
}
// 修改用源设备
export function updateUseSourceDevice(query) {
	query = formatePostParam(query)
	return request({
		url: `${BASE_URL}/EnterpriseSiteUseRadDeviceLst.asmx/updateUseSourceDevice`,
		method: 'post',
		data: query
	})
}
// 获取用源设备详情
export function getUseSourceDeviceInfo(query) {
	return request({
		url: `${BASE_URL}/EnterpriseSiteUseRadDeviceLst.asmx/getUseSourceDeviceInfo`,
		method: 'post',
		params: query
	})
}
// 获取设备因子列表
export function getDeviceMonitorList(query) {
	return request({
		url: `${BASE_URL}/UseRadDeviceMonitorObjectLst.asmx/getDeviceMonitorList`,
		method: 'post',
		params: query
	})
}

// 新增设备因子列表
export function insertDeviceMonitor(query) {
	query = formatePostParam(query)
	return request({
		url: `${BASE_URL}/UseRadDeviceMonitorObjectLst.asmx/insertDeviceMonitor`,
		method: 'post',
		params: query
	})
}

// 编辑设备因子列表
export function updateDeviceMonitor(query) {
	query = formatePostParam(query)
	return request({
		url: `${BASE_URL}/UseRadDeviceMonitorObjectLst.asmx/updateDeviceMonitor`,
		method: 'post',
		params: query
	})
}
// 获取设备因子详情
export function getDeviceMonitorInfo(query) {
	query = formatePostParam(query)
	return request({
		url: `${BASE_URL}/UseRadDeviceMonitorObjectLst.asmx/getDeviceMonitorInfo`,
		method: 'post',
		params: query
	})
}


// 获取源信息列表
export function getSourceList(query) {
	return request({
		url: `${BASE_URL}/EnterpriseSiteRadLst.asmx/getSiteRad`,
		method: 'post',
		params: query
	})
}

//新增源信息列表
export function insertRad(query) {
	query = formatePostParam(query)
	return request({
		url: `${BASE_URL}/EnterpriseSiteRadLst.asmx/insertRad`,
		method: 'post',
		data: query
	})
}
//获取源信息
export function getRadInfo(query) {
	return request({
		url: `${BASE_URL}/EnterpriseSiteRadLst.asmx/getRadInfo`,
		method: 'post',
		params: query
	})
}
//新增源信息列表
export function updateRad(query) {
	query = formatePostParam(query)
	return request({
		url: `${BASE_URL}/EnterpriseSiteRadLst.asmx/updateRad`,
		method: 'post',
		data: query
	})
}
// 获取视频信息列表
export function getVideoList(query) {
	// http://211.149.141.178:8080/Interface/EnterpriseVodeoLst.asmx
	return request({
		url: `${BASE_URL}/EnterpriseVodeoLst.asmx/getVideoList`,
		method: 'post',
		params: query
	})
}
// 编辑视频信息信息 、获取信息
export function updateVideoInfo(query) {
	query = formatePostParam(query)
	return request({
		url: `${BASE_URL}/EnterpriseVodeoLst.asmx/UpdateVideo`,
		method: 'post',
		params: query
	})
}
// 编辑视频信息信息 、获取信息
export function updateGetVideoInfo(query) {
	return request({
		url: `${BASE_URL}/EnterpriseVodeoLst.asmx/getVideo`,
		method: 'post',
		params: query
	})
}
// 新增视频信息信息
export function insertVideoInfo(query) {
	query = formatePostParam(query)
	return request({
		url: `${BASE_URL}/EnterpriseVodeoLst.asmx/InsertVideo`,
		method: 'post',
		params: query
	})
}
